use gloo_net::http::Response;

const NOTAUTHED: u16 = 401;

pub trait ResponseHelper {
    fn is_not_authed(&self) -> bool;
}

impl ResponseHelper for Response {
    fn is_not_authed(&self) -> bool {
        self.status() == NOTAUTHED
    }
}
